knitr::opts_chunk$set(echo = TRUE)
knitr::opts_knit$set(root.dir ='~/Documents/Projects/Short_Term_Broccoli/human_analysis/')
library(tidyverse)
library(magrittr)
library(lubridate)
library(plotly)

#Set Up Theme:
theme_sfn <- function(x){
  cowplot::theme_cowplot() %+replace%
  theme(
    update_geom_defaults('point', list(shape = 16, size = 4)),
    update_geom_defaults('path', list(size = 2))) 
}

#Set Cohort Colors:
chrt_col <- c('#E6122F', '#FAD20A', '#ED6700', '#6140B5', '#0A64FF', '#04B44A', '#49A9BA', '#C954A6')
chrt_1 <- c('#740615', '#9E0519', '#E6122F', '#B83E4F')
chrt_2 <- c('#FFEB85', '#FAD20A','#B59F31', '#806D12')
chrt_3 <- c('#ED6700', '#EB7E2B', '#B55810', '#F6A465')
chrt_4 <- c('#4F3494', '#54496E', '#705F9C', '#6140B5', '#8263CF', '#BAA2F6')
chrt_5 <- c('#0A64FF', '#003CA3', '#81A9EE')
chrt_6 <- c('#0C6F33', '#188C46', '#04B44A', '#1BDA67', '#86E9AE', '#96DFA3')
chrt_7 <- c('#15444D', '#0D7082', '#52939E', '#7DBECA', '#49A9BA', '#52D4EB', '#91E4F2', '#C8F2F9')
chrt_8 <- c('#9F1977', '#AB498E', '#C954A6')

BSS_col <- c(chrt_1, chrt_2, chrt_3, chrt_4, chrt_5, chrt_6, chrt_7, chrt_8)

#Set Broccoli and Alfalfa Colors:
BA_col <- c('#3AE151', '#DDE712')

#Set Label and Unlabeled Colors:
LUL_col <- c('#3A43E0', '#E81368')

#Useful Functions:
se <- function(x){
  sd(x)/sqrt(length(x))
}
#Metadata:
metadata_urine <- read_csv('~/Documents/Projects/Short_Term_Broccoli/Data/Metadata/Meta_urine.csv')
metadata_health <- read_csv('~/Documents/Projects/Short_Term_Broccoli/Data/Metadata/meta_health.csv')
metadata_sprout <- read_csv('~/Documents/Projects/Short_Term_Broccoli/Data/Metadata/sprout_meta.csv')
metadata_treatment <- read_csv('~/Documents/Projects/Short_Term_Broccoli/Data/Metadata/meta_treatment.csv')
metadata_fecal <- read_csv('~/Documents/Projects/Short_Term_Broccoli/Data/Metadata/meta_fecal_broconly.csv')

#Raw Data:
urine_raw <- read_csv('~/Documents/Projects/Short_Term_Broccoli/Data/SFN_Targeted/Urine/Urine_R_Format.csv')
fecal_raw <- read_csv('~/Documents/Projects/Short_Term_Broccoli/Data/SFN_Targeted/Fecal/Fecal_R_format.csv')
plasma_raw <- read_csv('~/Documents/Projects/Short_Term_Broccoli/Data/SFN_Targeted/Plasma/Plasma_R_Format.csv')

#Set Subject ID Color Names
subid <- metadata_treatment %>%
  filter(treatment %in% c('BU', 'BL')) %>%
  arrange(cohort) %>%
  pull(subject_id)
names(BSS_col) <- subid
pal_bss <- scale_color_manual(values = BSS_col)

#Set Cohort Color Names
names(chrt_col) <- 1:8
pal_chrt <- scale_color_manual(values = chrt_col)

#Set Broccoli Alfalfa Names:
names(BA_col) <- c('Broccoli', 'Alfalfa')
pal_ba <- scale_color_manual(values = BA_col)

#Set Label/Unlabel Names:
names(LUL_col) <- c('BL', 'BU')
pal_lb <- scale_color_manual(values = LUL_col)
#Urine:
#Clean the metadata
mdata_urine_clean <- metadata_urine %>%
  #Weight (grams) used as a  proxy for mL, convert to L
  mutate(across(c(4:9), ~.x/1000)) %>%
  #Pivot the data longer
  pivot_longer(cols = starts_with('vol'), names_to = 'time', values_to = 'volume') %>%
  #Rename the variables so they can treated as factors
  mutate(time = gsub('vol_', '', time)) %>%
  mutate(time = gsub('h','', time)) 

#Clean the urine data
urine_clean <- urine_raw %>%
  #Rename the time points so they match the metadata
  mutate(time = gsub('h','', time)) %>%
  #Join the data with the metadata
  left_join(., mdata_urine_clean) %>%
  group_by(subject_id, time) %>%
  #Multiply all the uM by the (proxy) volumes to convert to uMol recovered
  mutate(across(starts_with('SFN'), ~.x*volume)) %>%
  #Convert to factors for analysis + graphing
  modify_at(c('subject_id', 'time', 'cohort'), as.factor)
#Relevel the time variables to make it work
urine_clean$time %<>% fct_relevel(c('0', '3', '6', '24', '48', '72'))

#Plasma:
plasma_clean <- plasma_raw %>%
  mutate(time = gsub('h','', time)) %>%
  #Join the data with the metadata
  left_join(., metadata_treatment) %>%
  #Convert to factors for analysis + graphing
  modify_at(c('subject_id', 'time', 'cohort'), as.factor) %>%
  modify_at(4:10, as.numeric) 
plasma_clean$time %<>% fct_relevel(c('0', '3', '6', '24', '48', '72'))

#Fecal:
fecal_clean <- fecal_raw %>%
  rename_at(c('Treatment', 'Time'), tolower) %>%
  mutate(time = gsub('h','', time)) %>%
  #Join the data with the metadata
  left_join(., metadata_treatment) %>%
  #Convert to factors for analysis + graphing
  modify_at(c('subject_id', 'time', 'cohort'), as.factor) %>%
  modify_at(5:10, as.numeric) 
fecal_clean$time %<>% fct_relevel(c('0','24', '48', '72'))

Sanity Check

First we want to check and make sure that our alfalfa samples have no SFN in them:

Plasma:

plasma_san <- plasma_clean %>%
  mutate(treatment = ifelse(treatment %in% c('BL', 'BU'), 'Broccoli', 'Alfalfa')) %>%
  group_by(treatment, time) %>%
  summarise(mean_SFN = mean(SFN_Tot),
            SER = se(SFN_Tot))

psan <- ggplot(plasma_san, aes(x = treatment, y = mean_SFN, group = treatment, color = treatment)) +
  geom_point(aes(text = paste0('Mean SFN: ', round(mean_SFN, 3), ' µM \n',
                               'Standard Error: ', round(SER, 2)))) +
  facet_wrap(~time) +
  theme_sfn() +
  pal_ba +
  ylab('Mean Total SFN Metabolites (µM)') +
  xlab('Treatment') +
  guides(color = guide_legend('Treatment'))

ggplotly(psan, tooltip = 'text')
plasma_san_tab <- plasma_san %>%
  mutate(mse = paste0(round(mean_SFN, 3), '±', round(SER, 2))) %>%
  dplyr::select(treatment, time, mse) %>%
  pivot_wider(names_from = time, values_from = mse)

knitr::kable(plasma_san_tab)
treatment 0 3 6 24 48 72
Alfalfa 0±0 0±0 0±0 0±0 0±0 0±0
Broccoli 0±0 1.995±0.24 1.363±0.18 0.367±0.05 0.075±0.02 0.005±0

Urine

urine_san <- urine_clean %>%
  mutate(treatment = ifelse(treatment %in% c('BL', 'BU'), 'Broccoli', 'Alfalfa')) %>%
  drop_na() %>%
  group_by(treatment, time) %>%
  summarise(mean_SFN = mean(SFN_Tot, rm.na = T),
            SER = se(SFN_Tot))

usan <- ggplot(urine_san, aes(x = treatment, y = mean_SFN, group = treatment, color = treatment)) +
  geom_point(aes(text = paste0('Mean SFN: ', round(mean_SFN, 3), ' µmol \n',
                               'Standard Error: ', round(SER, 2)))) +
  facet_wrap(~time) +
  theme_sfn() +
  pal_ba +
  ylab('Mean Total SFN Metabolites (µmol)') +
  xlab('Treatment') +
  guides(color = guide_legend('Treatment'))

ggplotly(usan, tooltip = 'text')
urine_san_tab <- urine_san %>%
  mutate(mse = paste0(round(mean_SFN, 3), '±', round(SER, 2))) %>%
  dplyr::select(treatment, time, mse) %>%
  pivot_wider(names_from = time, values_from = mse)

knitr::kable(urine_san_tab)
treatment 0 3 6 24 48 72
Alfalfa 0±0 0±0 0±0 0±0 0±0 0±0
Broccoli 0.049±0.04 30.734±2.48 46.04±4.33 45.448±3.98 6.841±0.74 1.089±0.2

Fecal

fecal_san <- fecal_clean %>%
  mutate(treatment = ifelse(treatment %in% c('BL', 'BU'), 'Broccoli', 'Alfalfa')) %>%
  drop_na() %>%
  group_by(treatment, time) %>%
  summarise(mean_SFN = mean(SFN_Tot, rm.na = T),
            SER = se(SFN_Tot))

fsan <- ggplot(fecal_san, aes(x = treatment, y = mean_SFN, group = treatment, color = treatment)) +
  geom_point(aes(text = paste0('Mean SFN: ', round(mean_SFN, 3), ' nmol/g \n',
                               'Standard Error: ', round(SER, 2)))) +
  facet_wrap(~time) +
  theme_sfn() +
  pal_ba +
  ylab('Mean Total SFN Metabolites (nmol/g)') +
  xlab('Treatment') +
  guides(color = guide_legend('Treatment'))

ggplotly(fsan, tooltip = 'text')
fecal_san_tab <- fecal_san %>%
  mutate(mse = paste0(round(mean_SFN, 3), '±', round(SER, 2))) %>%
  dplyr::select(treatment, time, mse) %>%
  pivot_wider(names_from = time, values_from = mse)

knitr::kable(fecal_san_tab)
treatment 0 24 48 72
Alfalfa 0±0 0±0 0±0 0±0
Broccoli 0.023±0.02 0.805±0.25 0.199±0.05 0.074±0.02

Overall our data looks good and there is no SFN metabolites in the alfalfa samples. We will now switch over to only analyzing the broccoli data.

Question 1: Are there differences between Labeled and Unlabeled groups?

Before we combine the label and unlabeled data for analysis, we want to check and make sure there are no significant differences between the two. Let’s start with some boxplots.

#Filter our data to remove alfalfa folks
urine_clean %<>% filter(treatment %in% c('BL', 'BU'))
plasma_clean %<>% filter(treatment %in% c('BL', 'BU'))
fecal_clean %<>% filter(treatment %in% c('BL', 'BU'))

urine_tidy <- urine_clean %>%
  pivot_longer(cols = c(starts_with('SFN'),-SFN_Tot), names_to = 'metabolite', values_to = 'uMol')

plasma_tidy <- plasma_clean %>%
  pivot_longer(cols = c(starts_with('SFN'),-SFN_Tot), names_to = 'metabolite', values_to = 'uMol')

fecal_tidy <- fecal_clean %>%
  pivot_longer(cols = c(starts_with('SFN'),-SFN_Tot), names_to = 'metabolite', values_to = 'uMol')

Plasma

ggplot(plasma_clean, aes(x = treatment, y = SFN_Tot, fill = treatment)) +
  geom_boxplot() +
  facet_wrap(~time, scales = 'free_y') +
  theme_sfn() +
  scale_fill_manual(values = LUL_col, 
                    labels = c('Labeled', 'Unlabeled'),
                    name = 'Treatment') +
  xlab('Treatment') +
  ylab('Total SFN Metabolites (µM)') +
  theme(axis.text.x = element_blank())

Urine

ggplot(urine_clean, aes(x = treatment, y = SFN_Tot, fill = treatment)) +
  geom_boxplot() +
  facet_wrap(~time, scales = 'free_y') +
  theme_sfn() +
  scale_fill_manual(values = LUL_col, 
                    labels = c('Labeled', 'Unlabeled'),
                    name = 'Treatment') +
  xlab('Treatment') + 
  ylab('Total SFN Metabolites (µmol)') +
  theme(axis.text.x = element_blank())

Fecal

ggplot(fecal_clean, aes(x = treatment, y = SFN_Tot, fill = treatment)) +
  geom_boxplot() +
  scale_fill_manual(values = LUL_col, 
                    labels = c('Labeled', 'Unlabeled'),
                    name = 'Treatment') +
  facet_wrap(~time, scales = 'free_y') +
  theme_sfn()  +
  xlab('Treatment') + 
  ylab('Total SFN Metabolites (µmol)') +
  theme(axis.text.x = element_blank())

The boxplots look pretty good, let’s run some simple stats now to check:

Without Time Factor

pc <- plasma_clean %>%
  dplyr::select(subject_id, cohort, treatment, time, starts_with('SFN')) %>%
  inset('tissue', value = 'plasma')

uc <- urine_clean %>%
  dplyr::select(subject_id, cohort, treatment, time, starts_with('SFN')) %>%
  inset('tissue', value = 'urine')

fc <- fecal_clean %>%
  dplyr::select(subject_id, cohort, treatment, time, starts_with('SFN')) %>%
  inset('tissue', value = 'fecal')

colnames(uc) <- colnames(pc)
colnames(fc) <- colnames(pc)

allcom <- rbind(pc, uc, fc) %>%
  modify_at('tissue', as.factor)

labelt <- allcom %>%
  group_by(tissue) %>%
  nest() %>%
  mutate(pval = map_dbl(data, function(x) round(t.test(SFN_Tot ~ treatment, x)$p.value, 3))) %>%
  dplyr::select(-data)

knitr::kable(labelt)
tissue pval
plasma 0.801
urine 0.228
fecal 0.996

Stratified by Time

labelt_time <- allcom %>%
  group_by(tissue,time) %>%
  nest() %>%
  mutate(pval = map_dbl(data, function(x) round(t.test(SFN_Tot ~ treatment, x)$p.value, 3))) %>%
  dplyr::select(-data)

knitr::kable(labelt_time)
time tissue pval
0 plasma 0.331
3 plasma 0.815
6 plasma 0.811
24 plasma 0.834
48 plasma 0.913
72 plasma 0.602
0 urine 0.432
3 urine 0.931
6 urine 0.067
24 urine 0.431
48 urine 0.301
72 urine 0.186
0 fecal 0.281
24 fecal 0.703
48 fecal 0.426
72 fecal 0.044

It looks like when time is considered, there is a significant difference between our labeled and unlabeled participants at 72hours for fecal samples only. Considering that every other sample and time point is non-significant, this is probably simply due to inter-individual variation. Moving forward, we will combine our labeled and unlabeled data.

Question 2: Are there differences between cohorts?

Plasma

pcbox <- plasma_clean %>%
  group_by(cohort, subject_id) %>%
  summarise(total = sum(SFN_Tot))

ggplot(plasma_clean, aes(x = cohort, y = SFN_Tot, fill = cohort)) +
  geom_boxplot() +
  facet_wrap(~time, scales = 'free_y') +
  theme_sfn() +
  scale_fill_manual(values = chrt_col,
                    name = 'Cohort') +
  xlab('Cohort') +
  ylab('Total SFN Metabolites (µM)')

Urine

ggplot(urine_clean, aes(x = cohort, y = SFN_Tot, fill = cohort)) +
  geom_boxplot() +
  facet_wrap(~time, scales = 'free_y') +
  theme_sfn() +
  scale_fill_manual(values = chrt_col,
                    name = 'Cohort')  +
  xlab('Cohort') +
  ylab('Total SFN Metabolites (µmol)')

Fecal

ggplot(fecal_clean, aes(x = cohort, y = SFN_Tot, fill = cohort)) +
  geom_boxplot() +
  facet_wrap(~time, scales = 'free_y') +
  theme_sfn() +
  scale_fill_manual(values = chrt_col,
                    name = 'Cohort')  +
  xlab('Cohort') +
  ylab('Total SFN Metabolites (nmol/g)')

From the plots alone, it looks like there is probably some sort of cohort effect happening, especially in the plasma. Let’s run some stats just to verify that:

cohortp_time <- allcom %>%
  group_by(tissue, time) %>%
  nest() %>%
  mutate(pval = map_dbl(data, function(x) round(anova(lm(SFN_Tot ~ cohort, x))$"Pr(>F)"[1], 3))) %>%
  dplyr::select(-data)
knitr::kable(cohortp_time)
time tissue pval
0 plasma 0.294
3 plasma 0.000
6 plasma 0.000
24 plasma 0.000
48 plasma 0.013
72 plasma 0.231
0 urine 0.329
3 urine 0.202
6 urine 0.001
24 urine 0.000
48 urine 0.000
72 urine 0.001
0 fecal 0.589
24 fecal 0.251
48 fecal 0.239
72 fecal 0.449
cohortp <- allcom %>%
  group_by(tissue) %>%
  nest() %>%
  mutate(pval = map_dbl(data, function(x) round(anova(lm(SFN_Tot ~ cohort, x))$"Pr(>F)"[1], 3))) %>%
  dplyr::select(-data)
knitr::kable(cohortp)
tissue pval
plasma 0.000
urine 0.001
fecal 0.177

Regardless of time there is a significant difference between our cohorts, this isn’t necessarily surprising considering Cohort 1 consumed ~1.5x the amount of SFN compared to the other cohorts. For urine, since we know the aboslute volume of urine produced we can convert to percentage of dose recovered. Let’s complete that conversion and check for differences again.

metadata_sprout$cohort %<>% factor() 

urine_pct <- urine_clean %>%
  ungroup() %>%
  left_join(metadata_sprout) %>%
  mutate(across(starts_with('SFN'), ~.x/SFN_fed))

ggplot(urine_pct, aes(x = cohort, y = SFN_Tot, fill = cohort)) +
  geom_boxplot() +
  facet_wrap(~time, scales = 'free_y') +
  theme_sfn() +
  scale_y_continuous(labels = scales::label_percent()) +
  scale_fill_manual(values = chrt_col,
                    name = 'Cohort')  +
  xlab('Cohort') +
  ylab('Total SFN Metabolites (µmol)')

Total SFN

cp <- urine_pct %>%
  group_by(time) %>%
  nest() %>%
  mutate(pval = map_dbl(data, function(x) round(anova(lm(SFN_Tot ~ cohort, x))$"Pr(>F)"[1], 3))) %>%
  dplyr::select(-data)

knitr::kable(cp)
time pval
0 0.335
3 0.593
6 0.223
24 0.177
48 0.006
72 0.023

NIT & NAC

cpmt <- urine_pct %>%
  dplyr::select(sample, cohort, subject_id, time, SFN_NAC, SFN_NIT) %>%
  pivot_longer(cols = starts_with('SFN'), names_to = 'metabolite', values_to = 'umol') %>%
  group_by(metabolite, time) %>%
  nest() %>%
  mutate(pval = map_dbl(data, function(x) round(anova(lm(umol ~ cohort, x))$"Pr(>F)"[1], 3))) %>%
  dplyr::select(-data)

knitr::kable(cpmt)
time metabolite pval
0 SFN_NAC 0.329
0 SFN_NIT 0.150
3 SFN_NAC 0.704
3 SFN_NIT 0.223
6 SFN_NAC 0.475
6 SFN_NIT 0.175
24 SFN_NAC 0.523
24 SFN_NIT 0.046
48 SFN_NAC 0.001
48 SFN_NIT 0.067
72 SFN_NAC 0.000
72 SFN_NIT 0.420

Unsurprisingly, we are seeing difference across both all metabolites and time points. Let’s see whats driving the differences:

cdata_list <- urine_pct %>%
  group_by(time) %>%
  nest() 

walk2(.x = cdata_list$data, 
      .y = list('0h', '3h', '6h', '24h', '48h', '72h'),
      function(x,y){
        print(y)
        print(summary(lm(SFN_Tot ~ cohort, data = x)))
      })
## [1] "0h"
## 
## Call:
## lm(formula = SFN_Tot ~ cohort, data = x)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0023640 -0.0000285  0.0000000  0.0000000  0.0070919 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  0.0023640  0.0007652   3.089   0.0043 **
## cohort2     -0.0018563  0.0010822  -1.715   0.0966 . 
## cohort3     -0.0022700  0.0010822  -2.098   0.0445 * 
## cohort4     -0.0023640  0.0009879  -2.393   0.0232 * 
## cohort5     -0.0023640  0.0011689  -2.022   0.0521 . 
## cohort6     -0.0023355  0.0009879  -2.364   0.0247 * 
## cohort7     -0.0023640  0.0009372  -2.522   0.0172 * 
## cohort8     -0.0023640  0.0011689  -2.022   0.0521 . 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.00153 on 30 degrees of freedom
## Multiple R-squared:  0.2182, Adjusted R-squared:  0.0358 
## F-statistic: 1.196 on 7 and 30 DF,  p-value: 0.3349
## 
## [1] "3h"
## 
## Call:
## lm(formula = SFN_Tot ~ cohort, data = x)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.23901 -0.08428 -0.02168  0.07776  0.24315 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.32127    0.06389   5.029 2.34e-05 ***
## cohort2     -0.07178    0.09035  -0.794    0.433    
## cohort3      0.07853    0.09035   0.869    0.392    
## cohort4     -0.02584    0.08571  -0.301    0.765    
## cohort5     -0.10466    0.09759  -1.073    0.292    
## cohort6     -0.08000    0.08248  -0.970    0.340    
## cohort7     -0.05222    0.07824  -0.667    0.510    
## cohort8     -0.05362    0.09759  -0.549    0.587    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1278 on 29 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.162,  Adjusted R-squared:  -0.04026 
## F-statistic: 0.8009 on 7 and 29 DF,  p-value: 0.5931
## 
## [1] "6h"
## 
## Call:
## lm(formula = SFN_Tot ~ cohort, data = x)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.25001 -0.11956 -0.02477  0.08034  0.36420 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.50895    0.08777   5.798 2.45e-06 ***
## cohort2      0.05055    0.12413   0.407   0.6868    
## cohort3     -0.03482    0.12413  -0.280   0.7810    
## cohort4     -0.16631    0.11331  -1.468   0.1526    
## cohort5     -0.02376    0.13408  -0.177   0.8606    
## cohort6     -0.21564    0.11331  -1.903   0.0667 .  
## cohort7     -0.16788    0.10750  -1.562   0.1289    
## cohort8     -0.06327    0.13408  -0.472   0.6404    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1755 on 30 degrees of freedom
## Multiple R-squared:  0.2527, Adjusted R-squared:  0.0783 
## F-statistic: 1.449 on 7 and 30 DF,  p-value: 0.2231
## 
## [1] "24h"
## 
## Call:
## lm(formula = SFN_Tot ~ cohort, data = x)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.34500 -0.07125 -0.01148  0.07973  0.36503 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.57704    0.08258   6.987 9.18e-08 ***
## cohort2     -0.08511    0.11679  -0.729   0.4718    
## cohort3     -0.08570    0.11679  -0.734   0.4688    
## cohort4     -0.21205    0.10661  -1.989   0.0559 .  
## cohort5     -0.21438    0.12615  -1.699   0.0996 .  
## cohort6     -0.26581    0.10661  -2.493   0.0184 *  
## cohort7     -0.24922    0.10114  -2.464   0.0197 *  
## cohort8     -0.11582    0.12615  -0.918   0.3659    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1652 on 30 degrees of freedom
## Multiple R-squared:  0.2704, Adjusted R-squared:  0.1002 
## F-statistic: 1.588 on 7 and 30 DF,  p-value: 0.1771
## 
## [1] "48h"
## 
## Call:
## lm(formula = SFN_Tot ~ cohort, data = x)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.041168 -0.018467  0.000894  0.014721  0.049284 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.10119    0.01299   7.787 1.09e-08 ***
## cohort2     -0.02248    0.01838  -1.223 0.230762    
## cohort3     -0.02873    0.01838  -1.563 0.128458    
## cohort4     -0.04073    0.01678  -2.428 0.021391 *  
## cohort5     -0.02595    0.01985  -1.307 0.201105    
## cohort6     -0.06729    0.01678  -4.011 0.000370 ***
## cohort7     -0.06204    0.01592  -3.898 0.000505 ***
## cohort8     -0.04997    0.01985  -2.517 0.017405 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.02599 on 30 degrees of freedom
## Multiple R-squared:  0.4605, Adjusted R-squared:  0.3346 
## F-statistic: 3.658 on 7 and 30 DF,  p-value: 0.005696
## 
## [1] "72h"
## 
## Call:
## lm(formula = SFN_Tot ~ cohort, data = x)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0131021 -0.0041375 -0.0005639  0.0038665  0.0174242 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.020616   0.003666   5.624    4e-06 ***
## cohort2     -0.006747   0.005184  -1.302 0.202956    
## cohort3     -0.011055   0.005184  -2.133 0.041258 *  
## cohort4     -0.013105   0.004732  -2.769 0.009543 ** 
## cohort5     -0.008899   0.005599  -1.589 0.122462    
## cohort6     -0.017469   0.004732  -3.692 0.000884 ***
## cohort7     -0.016148   0.004489  -3.597 0.001140 ** 
## cohort8     -0.009557   0.005599  -1.707 0.098177 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.007331 on 30 degrees of freedom
## Multiple R-squared:  0.3952, Adjusted R-squared:  0.2541 
## F-statistic: 2.801 on 7 and 30 DF,  p-value: 0.02282

Unsurprisingly, it looks like the significance is being driven by Cohorts 6-8 which was when we were most confident about the amount of SFN we were feeding to our participants.

Question 3: What does timecourse of our different metabolites look like?

Distribution of each metabolite over time:

Plasma:

Bar Chart
metab_col <- c('#EF476F', '#F8961E', '#06D6A0', '#118AB2', '#7400B8', '#073B4C')
names(metab_col) <- rev(unique(plasma_tidy$metabolite))

plasma_dist <- plasma_tidy %>%
  group_by(metabolite, time) %>%
  summarise(mean = mean(uMol, na.rm = TRUE),
            ser = se(uMol))


ggplot(plasma_dist, aes(x = time, y = mean, fill = metabolite)) +
  geom_col() +
  theme_sfn() +
  scale_fill_manual(values = metab_col, name = 'Metabolite') + 
  xlab('Time (Hours)') +
  ylab('Mean Total SFN Metabolites (µM)')

Line Chart
ggplot(plasma_dist, aes(x = time, y = mean, color = metabolite)) +
  geom_errorbar(aes(ymin = mean - ser, ymax = mean+ser)) +
  geom_point() +
  geom_path(aes(group = metabolite)) +
  theme_sfn() +
  scale_color_manual(values = metab_col, name = 'Metabolite') +
  xlab('Time (Hours)') +
  ylab('Mean Total SFN Metabolites (µM)')

Urine

Bar Chart
urine_dist <- urine_tidy %>%
  drop_na() %>%
  group_by(metabolite, time) %>%
  summarise(mean = mean(uMol, na.rm = TRUE),
            ser = se(uMol))

ggplot(urine_dist, aes(x = time, y = mean, fill = metabolite)) +
  geom_col() +
  theme_sfn() +
  scale_fill_manual(values = metab_col, 
                    name = 'Metabolite') +
  xlab('Time (Hours)') +
  ylab('Mean Total SFN Metabolites (µmol)')

Bar Chart
ggplot(urine_dist, aes(x = time, y = mean, color = metabolite)) +
  geom_point() +
  geom_path(aes(group = metabolite)) +
  geom_errorbar(aes(ymin = mean - ser, ymax = mean+ser)) +
  theme_sfn() +
  scale_color_manual(values = metab_col, name = 'Metabolite') +
  xlab('Time (Hours)') +
  ylab('Mean Total SFN Metabolites (µmol)')

Fecal

Bar Chart
fecal_dist <- fecal_tidy %>%
  drop_na() %>%
  group_by(metabolite, time) %>%
  summarise(mean = mean(uMol, na.rm = T),
            ser = se(uMol))

ggplot(fecal_dist, aes(x = time, y = mean, fill = metabolite)) +
  geom_col() +
  theme_sfn() +
  scale_fill_manual(values = metab_col, name = 'Metabolite') +
  xlab('Time (Hours)') +
  ylab('Mean Total SFN Metabolites (µmol)')

Line Chart
ggplot(fecal_dist, aes(x = time, y = mean, color = metabolite)) +
  geom_errorbar(aes(ymin = mean - ser, ymax = mean+ser)) +
  geom_point() +
  geom_path(aes(group = metabolite)) +
  theme_sfn() +
  scale_color_manual(values = metab_col, name = 'Metabolite') +
  xlab('Time (Hours)') +
  ylab('Mean Total SFN Metabolites (µmol)')

Interindividual Variation of Each Metabolite

All results presented as percent of dose fed recovered to correct for cohorts 1-4 consuming unequal amounts of SFN

Plasma

All Metabolites
ppt <- ggplot(plasma_clean, aes(x = time, y = SFN_Tot, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time), stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'Total SFN: ', round(SFN_Tot, 3), ' µM \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('Total SFN Metaboeites (µM)')
  
plotly::ggplotly(ppt, tooltip = 'text')
SFN-NIT
pntc <- ggplot(plasma_clean, aes(x = time, y = SFN_NIT, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-NIT: ', round(SFN_NIT, 3), ' µM \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-NIT (µM)')

ggplotly(pntc, tooltip = 'text')
SFN-GSH
pgtc <- ggplot(plasma_clean, aes(x = time, y = SFN_GSH, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-GSH: ', round(SFN_GSH, 3), ' µM \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-GSH (µM)')

ggplotly(pgtc, tooltip = 'text')
SFN-CG
pcgtc <- ggplot(plasma_clean, aes(x = time, y = SFN_CG, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-CG: ', round(SFN_CG, 3), ' µM \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-CG (µM)')
  
  
ggplotly(pcgtc, tooltip = 'text')
SFN-Cys
pctc <- ggplot(plasma_clean, aes(x = time, y = SFN_Cys, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-Cys: ', round(SFN_Cys, 3), ' µM \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-Cys (µM)')


ggplotly(pctc, tooltip = 'text')
SFN-NAC
pnctc <- ggplot(plasma_clean, aes(x = time, y = SFN_NAC, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-NAC: ', round(SFN_NAC, 3), ' µM \n'))) +
  
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-NAC (µM)')

ggplotly(pnctc, tooltip = 'text')
SFN
pstc <- ggplot(plasma_clean, aes(x = time, y = SFN, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN: ', round(SFN, 3), ' µM \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN (µM)')

ggplotly(pstc, tooltip = 'text')

Urine - µmol Recovered

All Metabolites
utc <- ggplot(urine_clean, aes(x = time, y = SFN_Tot, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'Total SFN: ', round(SFN_Tot, 3), ' µmol \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('Total SFN Metabolites (µmol)')

ggplotly(utc, tooltip = 'text')
SFN-NIT
untc <- ggplot(urine_clean, aes(x = time, y = SFN_NIT, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-NIT: ', round(SFN_NIT, 3), ' µmol \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-NIT (µmol)')


ggplotly(untc, tooltip = 'text')
SFN-GSH
ugtc <- ggplot(urine_clean, aes(x = time, y = SFN_GSH, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-GSH: ', round(SFN_GSH, 3), ' µmol \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-GSH (µmol)')
 
ggplotly(ugtc, tooltip = 'text')
SFN-CG
ucgtc <- ggplot(urine_clean, aes(x = time, y = SFN_CG, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-CG: ', round(SFN_CG, 3), ' µmol \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-CG (µmol)')

ggplotly(ucgtc, tooltip = 'text')
SFN-Cys
uctc <- ggplot(urine_clean, aes(x = time, y = SFN_Cys, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-Cys: ', round(SFN_Cys, 3), ' µmol \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-Cys (µmol)')

ggplotly(uctc, tooltip = 'text')
SFN-NAC
unatc <- ggplot(urine_clean, aes(x = time, y = SFN_NAC, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-NAC: ', round(SFN_NAC, 3), ' µmol \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-NAC (µmol)')

ggplotly(unatc, tooltip = 'text')
SFN
ustc <- ggplot(urine_clean, aes(x = time, y = SFN, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN: ', round(SFN, 3), ' µmol \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN (µmol)')


ggplotly(ustc, tooltip = 'text')

Urine - % Dose Recovered

All Metabolites
utcp <- ggplot(urine_pct, aes(x = time, y = SFN_Tot, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'Total SFN: ', round(SFN_Tot*100, 2), ' % Dose \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  scale_y_continuous(labels = scales::label_percent()) +
  xlab('Time (Hours)') +
  ylab('Total SFN Metabolites (% Dose)')

ggplotly(utcp, tooltip = 'text')
SFN-NIT
untcp <- ggplot(urine_pct, aes(x = time, y = SFN_NIT, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-NIT: ', round(SFN_NIT*100, 2), ' % Dose \n'))) +
  geom_path() +
  theme_sfn() +
  scale_y_continuous(labels = scales::label_percent()) +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-NIT (% Dose)')


ggplotly(untcp, tooltip = 'text')
SFN-GSH
ugtcp <- ggplot(urine_pct, aes(x = time, y = SFN_GSH, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-GSH: ', round(SFN_GSH*100, 2), ' % Dose \n'))) +
  geom_path() +
  theme_sfn() +
  scale_y_continuous(labels = scales::label_percent()) +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-GSH (% Dose)')
 
ggplotly(ugtcp, tooltip = 'text')
SFN-CG
ucgtcp <- ggplot(urine_pct, aes(x = time, y = SFN_CG, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-CG: ', round(SFN_CG*100, 2), ' % Dose \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  scale_y_continuous(labels = scales::label_percent()) +
  xlab('Time (Hours)') +
  ylab('SFN-CG (% Dose)')

ggplotly(ucgtcp, tooltip = 'text')
SFN-Cys
uctcp <- ggplot(urine_pct, aes(x = time, y = SFN_Cys, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-Cys: ', round(SFN_Cys*100, 2), ' % Dose \n'))) +
  geom_path() +
  theme_sfn() +
  scale_y_continuous(labels = scales::label_percent()) +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-Cys (% Dose)')

ggplotly(uctcp, tooltip = 'text')
SFN-NAC
unatcp <- ggplot(urine_pct, aes(x = time, y = SFN_NAC, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-NAC: ', round(SFN_NAC*100, 2), ' % Dose \n'))) +
  geom_path() +
  theme_sfn() +
  scale_y_continuous(labels = scales::label_percent()) +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-NAC (% Dose)')

ggplotly(unatcp, tooltip = 'text')
SFN
ustcp <- ggplot(urine_pct, aes(x = time, y = SFN, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN: ', round(SFN*100, 2), ' % Dose \n'))) +
  geom_path() +
  theme_sfn() +
  scale_y_continuous(labels = scales::label_percent()) +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN (% Dose)')


ggplotly(ustcp, tooltip = 'text')

Fecal

All Metabolites
ftc <- ggplot(fecal_clean, aes(x = time, y = SFN_Tot, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'Total SFN Metabolites: ', round(SFN_Tot, 3), ' nmol/g \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('Total SFN Metabolites (nmol/g)')

ggplotly(ftc, tooltip = 'text')
SFN-NIT
fntc <- ggplot(fecal_clean, aes(x = time, y = SFN_NIT, group = subject_id, color = subject_id)) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-NIT: ', round(SFN_NIT, 3), ' nmol/g \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-NIT (nmol/g)')


ggplotly(fntc, tooltip = 'text')
SFN-GSH
fgtc <- ggplot(fecal_clean, aes(x = time, y = SFN_GSH, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-GSH: ', round(SFN_GSH, 3), ' nmol/g \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-GSH (nmol/g)')


ggplotly(fgtc, tooltip = 'text')
SFN-CG
fcgtc <- ggplot(fecal_clean, aes(x = time, y = SFN_CG, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-CG: ', round(SFN_CG, 3), ' nmol/g \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-CG (nmol/g)')


ggplotly(fcgtc, tooltip = 'text')
SFN-Cys
fctc <- ggplot(fecal_clean, aes(x = time, y = SFN_Cys, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-Cys: ', round(SFN_Cys, 3), ' nmol/g \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-Cys (nmol/g)')

ggplotly(fctc, tooltip = 'text')
SFN-NAC
fnatc <- ggplot(fecal_clean, aes(x = time, y = SFN_NAC, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN-NAC: ', round(SFN_NAC, 3), ' nmol/g \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN-NAC (nmol/g)')


ggplotly(fnatc, tooltip = 'text')
SFN
fstc <- ggplot(fecal_clean, aes(x = time, y = SFN, group = subject_id, color = subject_id)) +
  geom_bar(aes(group = time),stat = 'summary', fun = mean, fill = 'grey', color = 'black', alpha = 0.5) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'SFN: ', round(SFN, 3), ' nmol/g \n'))) +
  geom_path() +
  theme_sfn() +
  scale_color_manual(values = BSS_col, name = 'Subject') +
  xlab('Time (Hours)') +
  ylab('SFN (nmol/g)')

ggplotly(fstc, tooltip = 'text')

Question 4: Is there a relationship between metabolite production in different compartments?

This question is a little tricky to answer because the peak metabolite production of each tissue occurs at different times. There are a few ways we can handle this:

  1. Examine cumulative excretion of each metabolite in each tissue (remove the time component)
urine_cum <- urine_tidy %>%
  group_by(subject_id, metabolite) %>%
  summarise(total = sum(uMol)) 

plasma_cum <- plasma_tidy %>%
  group_by(subject_id, metabolite) %>%
  summarise(total = sum(uMol))

fecal_cum <- fecal_tidy %>%
  group_by(subject_id, metabolite) %>%
  summarise(total_fl = sum(uMol))

ccor <- left_join(urine_cum, plasma_cum, by = c('subject_id', 'metabolite'), suffix = c('_ur', '_pl')) %>%
  left_join(., fecal_cum, by = c('subject_id', 'metabolite')) %>%
  group_by(metabolite) %>%
  drop_na() %>%
  nest() %>%
  mutate(UrvPl = map_dbl(data, function(x) round(cor(x$total_ur, x$total_pl), 3))) %>%
  mutate(UrvFl = map_dbl(data, function(x) round(cor(x$total_ur, x$total_fl), 3))) %>%
  mutate(PlvFl = map_dbl(data, function(x) round(cor(x$total_pl, x$total_fl), 3))) %>%
  dplyr::select(-data)


knitr::kable(ccor)
metabolite UrvPl UrvFl PlvFl
SFN 0.564 0.376 0.340
SFN_CG 0.146 NA NA
SFN_Cys 0.792 -0.051 0.044
SFN_GSH 0.318 NA NA
SFN_NAC 0.755 0.272 0.078
SFN_NIT 0.910 -0.050 -0.029

Unsurprisingly, for most metabolites there is a positive correlation. Let’s look specifically at the maximal excretion time points for our study:

Plasma: 3 hours

Urine: 6 hours

Fecal: 24 hours

  1. Pairwise compare each time point of each tissue
pl3 <- plasma_tidy %>%
  filter(time == 3) 

ur6 <- urine_tidy %>%
  filter(time == 6)

fl24 <- fecal_tidy %>%
  filter(time == 24)

tcor <- left_join(ur6, pl3, by = c('subject_id', 'metabolite'), suffix = c('_ur', '_pl')) %>%
  left_join(., fl24, by = c('subject_id', 'metabolite')) %>%
  group_by(metabolite) %>%
  drop_na() %>%
  nest() %>%
  mutate(UrvPl = map_dbl(data, function(x) round(cor(x$uMol_ur, x$uMol_pl), 3))) %>%
  mutate(UrvFl = map_dbl(data, function(x) round(cor(x$uMol_ur, x$uMol), 3))) %>%
  mutate(PlvFl = map_dbl(data, function(x) round(cor(x$uMol_pl, x$uMol), 3))) %>%
  dplyr::select(-data)

knitr::kable(tcor)
metabolite UrvPl UrvFl PlvFl
SFN 0.444 0.300 0.418
SFN_Cys 0.789 -0.051 0.018
SFN_NAC 0.613 0.245 -0.042
SFN_CG 0.173 NA NA
SFN_GSH 0.011 NA NA
SFN_NIT 0.815 0.034 0.000

We are also interested in cross metabolite comparisons, specifically with NIT and other metabolites:

Plasma

Nitp <- plasma_clean %>%
  drop_na() %>%
  group_by(time) %>%
  nest() %>%
  mutate(NITvNAC = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN_NAC), 3))) %>%
  mutate(NITvCys = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN_Cys), 3))) %>%
  mutate(NITvGSH = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN_GSH), 3))) %>%
  mutate(NITvCG = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN_CG), 3))) %>%
  mutate(NITvSFN = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN), 3))) %>%
  dplyr::select(-data)

knitr::kable(Nitp)
time NITvNAC NITvCys NITvGSH NITvCG NITvSFN
0 NA NA NA NA NA
3 0.666 0.831 0.716 0.764 0.758
6 0.777 0.870 0.760 0.850 0.822
24 0.585 0.335 0.393 NA NA
48 NA NA NA NA NA
72 -0.056 NA NA NA NA

Urine

Nitu <- urine_clean %>%
  drop_na() %>%
  group_by(time) %>%
  nest() %>%
  mutate(NITvNAC = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN_NAC), 3))) %>%
  mutate(NITvCys = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN_Cys), 3))) %>%
  mutate(NITvGSH = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN_GSH), 3))) %>%
  mutate(NITvCG = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN_CG), 3))) %>%
  mutate(NITvSFN = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN), 3))) %>%
  dplyr::select(-data)

knitr::kable(Nitu)
time NITvNAC NITvCys NITvGSH NITvCG NITvSFN
0 0.596 0.586 NA -0.039 0.615
3 0.494 0.405 0.144 0.343 0.597
6 0.802 0.676 -0.052 -0.049 0.643
24 0.725 0.631 NA -0.130 0.511
48 0.680 0.598 NA NA NA
72 0.507 0.412 NA NA NA

Fecal

Nitf <- fecal_clean %>%
  drop_na() %>%
  group_by(time) %>%
  nest() %>%
  mutate(NITvNAC = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN_NAC), 3))) %>%
  mutate(NITvCys = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN_Cys), 3))) %>%
  mutate(NITvGSH = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN_GSH), 3))) %>%
  mutate(NITvCG = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN_CG), 3))) %>%
  mutate(NITvSFN = map_dbl(data, function(x) round(cor(x$SFN_NIT, x$SFN), 3))) %>%
  mutate(NACvSFN = map_dbl(data, function(x) round(cor(x$SFN_NAC, x$SFN), 3))) %>%
  dplyr::select(-data)

knitr::kable(Nitf)
time NITvNAC NITvCys NITvGSH NITvCG NITvSFN NACvSFN
0 NA NA NA NA NA -0.044
24 -0.034 0.1 NA NA 0.175 0.393
48 NA NA NA NA NA NA
72 NA NA NA NA 0.023 NA

Overall it seems that people that are good at converting GRP to SFN are good at it for all metabolites.

Question 5: Is there a relationship between the time someone produces a fecal sample and the amount of SFN in the sample?

fecal_dif <- metadata_fecal %>%
  modify_at(4:11, mdy_hm) %>%
  mutate(dif_0h = as.numeric(difftime(`0h_processed`,`0h_produced`, units = 'hours'))) %>%
  mutate(dif_24h = as.numeric(difftime(`24h_processed`,`24h_produced`, units = 'hours'))) %>%
  mutate(dif_48h = as.numeric(difftime(`48h_processed`,`48h_produced`, units = 'hours'))) %>%
  mutate(dif_72h = as.numeric(difftime(`72h_processed`,`72h_produced`, units = 'hours'))) %>%
  dplyr::select(ID, dif_0h, dif_24h, dif_48h, dif_72h) %>%
  pivot_longer(cols = starts_with('dif'), names_to = 'time', values_to = 'time_dif') %>%
  mutate(time = gsub('dif_', '', time)) %>%
  mutate(time = gsub('h', '', time)) 
fecal_dif$time %<>% factor(., levels = c(0,24,48,72))

fecal_time <- left_join(fecal_clean, fecal_dif, by = c('subject_id' = 'ID', 'time'))

ft24 <- fecal_time %>%
  filter(time == 24)

ggplot(fecal_time, aes(x = time_dif, y = SFN_Tot, color = subject_id)) +
  geom_point() +
  theme_sfn() +
  scale_color_manual(values = BSS_col) +
  facet_wrap(~time, scales = 'free_y') +
  xlab('Time from Sample Production to Processing (Hours)') +
  ylab('Total SFN Metabolites (nmol/g)')

ggplot(ft24, aes(x = time_dif, y = SFN_Tot, color = subject_id)) +
  geom_point() +
  theme_sfn() +
  scale_color_manual(values = BSS_col) +
  xlab('Time from Sample Production to Processing (Hours)') +
  ylab('Total SFN Metabolites (nmol/g)') +
  ggtitle('24 Hours Only')

fecal_time %>%
  pivot_longer(cols = starts_with('SFN'), names_to = 'metabolite', values_to = 'uMol') %>%
  drop_na() %>%
  group_by(metabolite, time) %>%
  nest() %>%
  mutate(tcor = map_dbl(data, function(x) cor(x$time_dif, x$uMol))) %>%
  drop_na() %>%
  dplyr::select(-data)
## # A tibble: 14 × 3
## # Groups:   time, metabolite [14]
##    time  metabolite     tcor
##    <fct> <chr>         <dbl>
##  1 0     SFN        -0.0958 
##  2 0     SFN_Cys    -0.121  
##  3 0     SFN_NAC    -0.121  
##  4 0     SFN_Tot    -0.137  
##  5 24    SFN        -0.0740 
##  6 24    SFN_Cys     0.192  
##  7 24    SFN_NAC    -0.124  
##  8 24    SFN_NIT     0.409  
##  9 24    SFN_Tot    -0.00872
## 10 48    SFN         0.534  
## 11 48    SFN_Tot     0.534  
## 12 72    SFN         0.651  
## 13 72    SFN_NIT     0.274  
## 14 72    SFN_Tot     0.680

Interestingly, it looks like the opposite of what we would have expected is happening. Instead of SFN degrading over time, it appears that the longer there is between production and collection of the sample, the greater amount of SFN is present. This could have 2 explanations:

  1. GRP is being hydrolyzed to SFN by the gut microbiome leading to the increase in SFN
  2. These participants are producing their sample relatively closer to when they consumed broccoli, thus causing them to have artificially high numbers.

Since we know what time each fecal sample was produced and what time each participant consumed their sprouts, we can examine SFN in fecal relative to sprout consumption. Essentially, we are treating fecal production time as a continuous variable as opposed to a discrete variable.

fecal_dif2 <- metadata_fecal %>%
  modify_at(3:11, mdy_hm) %>%
  mutate(across(c(`0h_produced`, `24h_produced`, `48h_produced`, `72h_produced`), 
                ~as.numeric(difftime(.x, time_consumed, units = 'hours')))) %>%
  dplyr::select(where(is.character), where(is.numeric)) %>%
  pivot_longer(cols = ends_with('produced'), names_to = 'time', values_to = 'time_passed') %>%
  mutate(time = gsub('h_produced', '', time))
fecal_dif2$time %<>% factor(., levels = c(0,24,48,72))
fecal_time2 <- left_join(fecal_clean, fecal_dif2, by = c('subject_id' = 'ID', 'time'))

fti <- ggplot(fecal_time2, aes(x = time_passed, y = SFN_Tot, color = subject_id)) +
  geom_point(aes(text = paste0('Participant: ', subject_id, '\n',
                               'Cohort: ', cohort, '\n',
                               'Total SFN: ', round(SFN_Tot, 3), ' nmol/g \n',
                               'Time Passed: ', round(time_passed, 2)))) +
  theme_sfn() +
  scale_color_manual(values = BSS_col) +
  geom_vline(xintercept = 0, linetype = 'dashed') +
  geom_vline(xintercept = 24, linetype = 'dashed') +
  geom_vline(xintercept = 48, linetype = 'dashed') +
  geom_vline(xintercept = 72, linetype = 'dashed') +
  scale_x_continuous(breaks = c(0,24,48,72)) +
  xlab('Time from Eating Sprouts (Hours)') +
  ylab('Total SFN Metabolites (nmol/g)')
  
plotly::ggplotly(fti, tooltip = 'text')

Overall, it looks like fecal SFN is peaking around 24 hours and second smaller peak appears to be occurring around 48 hours. For participants, SFN excretion is being observed as early as 3 or 6 hours - it is unclear if this excretion is due to GRP hydrolysis by the gut microbiome or by entero-hepatic circulation of SFN metabolites via billiary excretion. Hopefully analysis of GRP will help to alleviate these questions.